##############################################################################
# Root CMakeLists.txt                                                        #
#                                                                            #
# Authors:  1101627719@qq.com                                                 #
#                                                                            #
##############################################################################
cmake_minimum_required(VERSION 3.8)
project(plum_dev C)

# ============================================================================
# 1. Configure Project
# ============================================================================
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)


# ============================================================================
# 2. Configure for Target 
# ============================================================================
set(CMAKE_C_FLAGS "-std=gnu99") 
set(CMAKE_CXX_FLAGS "-lstdc++")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-Map=output.map" CACHE INTERNAL "")

# ============================================================================
# 3. Dump Cmake Version
# ============================================================================
message(STATUS "CMake version: " ${CMAKE_VERSION})
message(STATUS "CMake system name: " ${CMAKE_SYSTEM_NAME})
string(TIMESTAMP BUILD_TIMESTAMP UTC)
message(STATUS "Timestamp: " ${BUILD_TIMESTAMP})
message(STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message(STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR})
# Check Debug or Release
message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})

# ============================================================================
# 4. include dicrectory
# ============================================================================

include_directories(core)

# ============================================================================
# 4. sub dicrectory
# ============================================================================

add_subdirectory(core)
#add_subdirectory(examples)
